package com.springexample.demo.service.impl;

import com.springexample.demo.component.BeanUtils;
import com.springexample.demo.service.ConfigurationHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;

/**
 * @Author XuDon
 * @ClassName ConfigurationA.java
 * @Description TODO
 * @Date 2022年04月21日 14:35:00
 **/
@Slf4j
@Service
public class ConfigurationB implements ConfigurationHandler {
    @Autowired
    private BeanUtils beanUtils;

    ConfigurationB(){
        log.info("ConfigurationB开始加载");
    }

    @Override
    public String unRegisterBean(){
        beanUtils.unRegisterBean("configurationB");
        return "configurationB已注销";
    }

    @Override
    public String getValue() {
        return "ConfigurationB";
    }
}
